require('./mongoose')
var mongoose = require('mongoose');
var Schema = mongoose.Schema;

/**
  name: 标签名
  code: 标识
  schemadef: 所属模型
*/
var tagSchema = Schema({
  name: { type: String, required: true },
  code: { type: String, required: true },
  schemadef: { type: Schema.Types.ObjectId, ref: 'SchemaDef' },
  attrs: []
})


var Tag = mongoose.model('Tag', tagSchema);

module.exports = Tag
